﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Bug_Speed
{
    public  class EventProcessArg
    {
        private  int _currentProcessSteps;
        private int _maximum;
        private int _minimum;
        public  int CurrentProcessStepsNumber
        {
            set { _currentProcessSteps = value; }
            get { return _currentProcessSteps; }
        }

        public int Maximum
        {
            set { _maximum = value; }
            get { return _maximum; }
        }

        public int Minimum
        {
            set { _minimum = value; }
            get { return _minimum; }
        }
    }

    public class ProcessEventSource
    {

        public delegate void ProcessEventHandler(EventProcessArg e);

        public event ProcessEventHandler EventProcessSteps;


        public ProcessEventSource()
        {

        }

        public virtual void OnEventCurrentSteps(EventProcessArg e)
        {
            if (EventProcessSteps != null)
            {
                EventProcessSteps(e);
            }

        }

    }

    public class ProcessEvent : ProcessEventSource
    {
        public override void OnEventCurrentSteps(EventProcessArg e)
        {
            
            //do somthing you want.
            
            base.OnEventCurrentSteps(e);
        }
    }
}
